package world.xuewei.component;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;

@Component
public class ImageConstants {

    @Value("${img.url}")
    private String url;

    private static String BASE_URL;

    @PostConstruct
    public void init() {
        BASE_URL = url;
    }

    // 轮播图路径
    public static final class Carousel {
        public static final String CAROUSEL_1 = BASE_URL + "轮播/1.jpg";
        public static final String CAROUSEL_2 = BASE_URL + "轮播/2.jpg";
        public static final String CAROUSEL_3 = BASE_URL + "轮播/3.jpg";
        public static final String CAROUSEL_4 = BASE_URL + "轮播/4.jpg";
    }
}